import { type VxeColumnPropTypes } from "vxe-table/types/column"
const solts: VxeColumnPropTypes.Slots = {
  default: ({ row, column }) => {
    console.log(row)
    console.log(column)
    const cellValue = row[column.field]
    console.log(cellValue)
    // let type = "danger"
    let value = "未开通"
    if (!cellValue || !cellValue.vipEndTime) {
      value = "未开通"
    } else {
      const endTime = Date.parse(cellValue.vipEndTime)
      const now = Date.now()
      console.log(endTime)
      console.log(now)
      if (now < endTime) {
        value = "使用中"
      } else {
        value = "已过期"
      }
    }
    // class={`el-tag el-tag--${type} el-tag--plain`}
    return [<span>{value}</span>]
  }
}

export default solts
